package com.swsc.solarverse.service.analysis;

import com.swsc.solarverse.common.mybatis.MybatisService;
import com.swsc.solarverse.dao.entity.analysis.CorporationEfficiencyRecordDO;

import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author AutoGenerator
 * @since 2024-07-02
 */
public interface ICorporationEfficiencyRecordService extends MybatisService<CorporationEfficiencyRecordDO> {
    int insertIgnoreBatch(List<CorporationEfficiencyRecordDO> list);

    /**
     * 平均电量损失比例
     * @param organNoIn
     * @param dataTimeGe
     * @param dataTimeLt
     * @return
     */
    Double avgLossE(Collection<Integer> organNoIn, LocalDateTime dataTimeGe, LocalDateTime dataTimeLt);

    LocalDateTime maxDataTime(Integer organNo);

    CorporationEfficiencyRecordDO getRecord(Integer tenantNo, Integer organNo, LocalDateTime dataTime);
    CorporationEfficiencyRecordDO getLatestRecord(Integer tenantNo, Integer organNo);
}
